<?php

namespace Tests\Browser\Pages\H5;

use App\Models\Customer\Customer;
use App\Models\OpenWechat\ScanEvent;
use App\Models\OpenWechat\WechatUser;
use Tests\Browser\Pages\H5\Contracts\H5AbstractPage;

class FavorScanLoginPage extends H5AbstractPage
{
    /**
     * @var string
     */
    private $url;

    public function __construct(WechatUser $wechatUser, Customer $customer, ScanEvent $scanEvent, string $url)
    {
        parent::__construct($wechatUser, $customer, $scanEvent);

        $this->url = $url;
    }

    /**
     * Get the URL for the page.
     *
     * @return string
     */
    public function url()
    {
        return $this->url;
    }

    /**
     * Get the element shortcuts for the page.
     *
     * @return array
     */
    public function elements()
    {
        return [
            '@login-phone-input' => 'input[name=login__phone]',
            '@login-btn' => 'input[name=login__submit]',
        ] + parent::elements();
    }
}
